package cn.silver.module.message.param;

import cn.silver.framework.core.utils.DateUtils;
import cn.silver.framework.mybatis.annotation.TableField;
import cn.silver.framework.mybatis.enums.SearchEnums;
import cn.silver.framework.mybatis.param.BaseParam;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author zhouxiaobo
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(name = "ChannelParam", title = "消息管理-验证码查询对象")
public class CaptchaParam extends BaseParam implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(title = "发送渠道")
    @TableField(name = "channel", searchType = SearchEnums.EQ)
    private String channel;
    /**
     * 接收账号
     */
    @Schema(title = "接收账号")
    @TableField(name = "account", searchType = SearchEnums.LIKE)
    private String account;
    @Schema(title = "发送时间")
    @TableField(name = "send_time", searchType = SearchEnums.BETWEEN)
    @JsonFormat(timezone = DateUtils.TIME_ZONE, pattern = DateUtils.YYYY_MM_DD_HH_MM_SS)
    private LocalDateTime[] sendTime;
}
